#include "ActivityGuard.h"
#include "Script/ScriptMgr_CS.h"
#include "SceneMgr/CenterSceneMrg.h"
#include "CenterService.h"
#include "Duplicate/CenterDuplicateMgr.h"
#include "Room/RoomMgr.h"

CActivityGuard::CActivityGuard()
{
}

CActivityGuard::~CActivityGuard()
{

}

void CActivityGuard::OnActivityStart()
{
	Reset();
}

void CActivityGuard::OnActivityStop()
{
	Reset();
}

void CActivityGuard::Reset()
{
	CActivity::Reset();
}

void CActivityGuard::OnUpdate()
{
	CActivity::OnUpdate();

}

int32_t CActivityGuard::Enter(CenterEnterActivityReq &req)
{
	LogicToCenter_EnterDupReq reqEnter;
	reqEnter.set_charid(req.charid());
	reqEnter.set_duplicate_id(req.dup_id());
	reqEnter.set_key_type(EDuplicateKeyType_Room);
	reqEnter.set_key_value(g_GetRoomMgr()->getCharRoom(req.charid()));
	//
	uint32_t dupSceneId = 0;
	return g_GetCenterDuplicateMgr()->enterDupReq(reqEnter, dupSceneId);
}